import { request } from '@gui-pkg/request';
import { GetWeatherInfoModel } from './model/weatherModel';

/**
 * @description: getWeatherInfo
 */
const requestOptions = {
  joinParamsToUrl: false,
  withToken: false,
  joinTime: false,
  joinPrefix: false,
  isTransformResponse: false,
};

// 天气服务
export const getWeatherInfo = (code='DOsub') => {
  return request.get<GetWeatherInfoModel>({ url: `http://www.nmc.cn/rest/weather?stationid=${code}` }, requestOptions);
};

//查询发送任务队列数据
export const getWarnTask = () => {
  return request.get({ url: '/api/warnmsg/getWarnTask' });
};
export const sendMsgLJ = (params) => {
  return request.post({ url: '/api/warnmsg/sendMsgLJ' ,params});
};
